﻿@namespace MudBlazor
@typeparam T;
@inherits MudComponentBase
@implements IDisposable;

<span  @onclick="ToggleSortDirection" class="@Classname" style="@Style" @attributes="@UserAttributes">
    @if (!AppendIcon)
    {
        @ChildContent
    }
    @if (_direction != SortDirection.None)
    {
        <MudIcon Icon="@SortIcon" Class="@GetSortIconClass()" />
    }
    else
    {
        <MudIcon Icon="@SortIcon" Class="mud-table-sort-label-icon"/>
    }
    @if (AppendIcon)
    {
        @ChildContent
    }
</span>
